<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML>
<html lang="en-US">
	<head>
		<meta charset="UTF-8">
		<title>凯盛项目管理系统</title>
		<link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
		<link rel = "Shortcut Icon" href="http://www.kaishengit.com/favicon.ico" />
		<script type="text/javascript" src="js/jquery.js"></script>
		<style type="text/css">
.input-xlarge {
	width: 460px;
}
</style>
	</head>
	<body>
		<div class="container">
			<div class="navbar">
				<div class="navbar-inner">
					<div class="container">
						<a href="main" class="brand">凯盛项目管理系统</a>
						<ul class="nav pull-right">
							<li class="active">
								<a>${sessionScope.user.name }</a>
							</li>
							<li>
								<a href="user">个人资料</a>
							</li>
							<li class="divider-vertical"></li>
							<li>
								<a href="loginout">安全退出</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="span3">
					<div class="wall">
						<ul class="nav nav-list">
							<li class="nav-header">
								${project.name }
							</li>
							<li class="divider"></li>
							<li>
								<a href="project?id=${project.id }">
									<i class="icon-home"></i>最新动态
								</a>
							</li>
							<li>
								<a href="goal"> 
									<i class="icon-flag"></i>目标
								</a>
							</li>
							<li>
								<a href="document"> 
									<i class="icon-folder-open"></i>资料库
								</a>
							</li>
							<li>
								<a href="folder"> 
									<i class="icon-file"></i>文件共享 
								</a>
							</li>
							<li class="active">
								<a href="contact"> 
									<i class="icon-white icon-user"></i>联系人 
								</a>
							</li>
							<li>
								<a href="idea">
									<i class="icon-fire"></i>想法 
								</a>
							</li>
							<li>
								<a href="project?m=edit"> 
									<i class="icon-cog"></i>项目设置 
								</a>
							</li>
						</ul>
					</div>
				</div>
				<div class="span9">
                <form class="form-horizontal" action="contact?m=new" method="post" id="myform">
                    <fieldset>
                        <legend>添加新联系人</legend>
                        <div class="control-group" id="namediv">
                            <label class="control-label" for="name">姓名</label>
                            <div class="controls">
                                <input type="text" class="input-xlarge" id="name" name="name">
                            </div>
                        </div>
                        <div class="control-group" id="companydiv">
                            <label class="control-label" for="company">公司</label>
                            <div class="controls">
                                <input type="text" class="input-xlarge" id="company" name="company">
                            </div>
                        </div>
                        <div class="line"></div>
                        <div class="control-group" id="mobilediv">
                            <label class="control-label" for="mobile">手机</label>
                            <div class="controls">
                                <input type="text" class="input-xlarge" id="mobile" name="mobile">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="phone">固话</label>
                            <div class="controls">
                                <input type="text" class="input-xlarge" id="phone" name="phone">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="email">邮箱</label>
                            <div class="controls">
                                <input type="text" class="input-xlarge" id="email" name="email">
                            </div>
                        </div>
                        <div class="line"></div>
                        <div class="control-group">
                            <label class="control-label" for="address">地址</label>
                            <div class="controls">
                                <input type="text" class="input-xlarge" id="address" name="address">
                            </div>
                        </div>
                        <div class="line"></div>
                        <div class="control-group">
                            <label class="control-label" for="home_page">主页</label>
                            <div class="controls">
                                <div class="input-prepend">
                                    <span class="add-on">http://</span><input type="text" class="input-large" id="home_page" name="home_page">
                                </div>
                                <p class="help-block">www.kaishengit.com</p>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="weibo">微博</label>
                            <div class="controls">
                                <select name="weibo_select" id="weibo_select" class="span2">
                                    <option value="1">新浪微博</option>
                                    <option value="2">腾讯微博</option>
                                    <option value="3">Twitter</option>
                                </select>
                                <div class="input-prepend">
                                    <span class="add-on">@</span><input type="text" class="span2" id="weibo" name="weibo">
                                </div>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="Introduction">简介</label>
                            <div class="controls">
                                <textarea name="Introduction" id="Introduction" class="input-xlarge" rows="6"></textarea>
                            </div>
                        </div>
                        <div class="form-actions">
                            <button class="btn btn-primary" type="button" id="btn">保存</button>
                            <a href="contact" class="btn">返回</a>
                        </div>
                    </fieldset>
                </form>
            </div>
        </div>
    </div>
    <script type="text/javascript">
    	$(document).ready(function() {

            $("#name").focus(function() {
                $("#namediv").removeClass("error");
            });
            $("#name").blur(function() {
                var name = $(this).val();
                if (name.trim() == "") {
                    $("#namediv").addClass("error");
                }
            });
            $("#company").focus(function() {
                $("#companydiv").removeClass("error");
            });
            $("#company").blur(function() {
                var company = $(this).val();
                if (company == "") {
                    $("#companydiv").addClass("error");
                }
            });
            $("#mobile").focus(function() {
                $("#mobilediv").removeClass("error");
            });
            $("#mobile").blur(function() {
                var mobile = $(this).val();
                if (mobile == "") {
                    $("#mobilediv").addClass("error");
                }
            });
            $("#btn").click(function() {
                var name = $("#name").val();
                var company = $("#company").val();
                var mobile = $("#mobile").val();
                if (name.trim() == "") {
                    $("#namediv").addClass("error");
                }
                if (company == "") {
                    $("#companydiv").addClass("error");
                }
                if (mobile == "") {
                    $("#mobilediv").addClass("error");
                }
                if (name.trim() != "" && company != "" && mobile != "") {
                    $("#myform").submit();
                }
            });
        });
    </script>
</body>
</html>